package com.hnd.springframework.beans.factory.support;

import com.hnd.springframework.beans.factory.config.SinletonBeanRegisty;

import java.util.HashMap;
import java.util.Map;

public class DefaultSinletonBeanRegisty implements SinletonBeanRegisty {
   private Map<String, Object> sinletonBeansMap = new HashMap<>();
    @Override
    public Object getSingletonBean(String BeanName) {
        return this.sinletonBeansMap.get(BeanName);
    }

    public void addSinleton(String beanName, Object Bean) {
        this.sinletonBeansMap.put(beanName, Bean);
    }

}
